package org.cloudnote.controller;

import org.cloudnote.service.UserService;
import org.cloudnote.util.NoteResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/user")
public class UserRegistController {

    @Autowired
    private UserService userService;

    @RequestMapping("/regist.do")
    @ResponseBody
    public NoteResult execute(String name,String password,String nick){
        NoteResult result = userService.regist(name, password, nick);
        return result;
    }

}
